16 research outputs found

    An Environment for Analyzing Space Optimizations in Call-by-Need Functional Languages

    Full text link
    We present an implementation of an interpreter LRPi for the call-by-need calculus LRP, based on a variant of Sestoft's abstract machine Mark 1, extended with an eager garbage collector. It is used as a tool for exact space usage analyses as a support for our investigations into space improvements of call-by-need calculi.Comment: In Proceedings WPTE 2016, arXiv:1701.0023

    The deglacial forest conundrum

    Get PDF
    How fast the Northern Hemisphere (NH) forest biome tracks strongly warming climates is largely unknown. Regional studies reveal lags between decades and millennia. Here we report a conundrum: Deglacial forest expansion in the NH extra-tropics occurs approximately 4000 years earlier in a transient MPI-ESM1.2 simulation than shown by pollen-based biome reconstructions. Shortcomings in the model and the reconstructions could both contribute to this mismatch, leaving the underlying causes unresolved. The simulated vegetation responds within decades to simulated climate changes, which agree with pollen-independent reconstructions. Thus, we can exclude climate biases as main driver for differences. Instead, the mismatch points at a multi-millennial disequilibrium of the NH forest biome to the climate signal. Therefore, the evaluation of time-slice simulations in strongly changing climates with pollen records should be critically reassessed. Our results imply that NH forests may be responding much slower to ongoing climate changes than Earth System Models predict

    Space optimizations in deterministic and concurrent call-by-need functional programming languages

    No full text
    In dieser Dissertation werden Speicherverbrauch und Laufzeit von lazy-auswertenden funktionalen Programmiersprachen untersucht. Die getypten erweiterten lambda-Kalküle LRP und CHF* werden als Kernsprachen für Haskell und Concurrent Haskell verwendet. Jeweils zu LRP und CHF* kompatible abstrakten Maschinen werden vorgestellt. Zur Störungsfreiheit der Platzmessung wird ein klassisch implementierbarer Garbage Collector nach jedem LRP-Rechenschritt angewendet. Die Größe size von Ausdrücken, sowie das Platzmaß spmax als Maximum aller garbage-freien Ausdrücke während einer LRP-Programmausführung, werden definiert. Programm-Transformationen werden in Form von Code-zu-Code-Transformationen betrachtet. Die Begriffe Space Improvement und Space Equivalence als Eigenschaften von Transformationen werden definiert. Ein Space Improvement verändert weder die Semantik noch erhöht sich der benötigte Speicherverbrauch, bei einer Space Equivalence bleibt der Speicherverbrauch gleich. Einige Transformationen werden als Space Improvements und Equivalences gezeigt. Eine abstrakte Maschine für Messungen des Speicherverbrauchs wird eingeführt. Eine Implementierung dieser wird für komplexere Platz- und Laufzeit-Analysen genutzt. Total Garbage Collection ersetzt Teilausdrücke durch eine nicht-terminierende Konstante mit Größe Null, falls sich an der Gesamtterminierung nichts ändert. Dadurch wird die Unabhängigkeit des Improvement-Begriffs vom verwendeten Garbage Collector gesteigert. Analog zu Space Improvements und Equivalences werden die Begriffe Total Space Improvement und Total Space Equivalence definiert, bloß dass diese den Total Garbage Collector bei der Platzmessung nutzen. Einige Total Space Improvements und Equivalences werden gezeigt. Platzmaße für CHF* werden definiert, die kompatibel zu den Platzmaßen von LRP sind. Ein Algorithmus wird entwickelt, der den benötigten Speicherplatz für unabhängige Prozesse mit synchronen Start- und Endpunkten bezüglich Scheduling in Sortierkomplexität berechnet. Bei Hinzunahme einer konstanten Anzahl an Synchronisierungen und konstanter Anzahl an Prozessen ist die Laufzeit polynomiell, bei beliebigen Synchronisierungsbeschränkungen ist das Problem NP-vollständig. Für Speicher- und Laufzeitanalysen in CHF* werden abstrakte Maschinen entworfen und Implementierungen dieser für Speicher- und Laufzeit-Analysen verwendet.In this thesis the space consumption and runtime of lazy-evaluating functional programming languages are analyzed. The typed and extended lambda-calculi LRP and CHF* as core languages for Haskell and Concurrent Haskell are used. For each LRP and CHF* compatible abstract machines are introduced. Too lower the distortion of space measurement a classical implementable garbage collector is applied after each LRP reduction step. Die size of expressions and the space measure spmax as maximal size of all garbage-free expressions during an LRP-evaluation, are defined. Program-Transformations are considered as code-to-code transformations. The notions Space Improvement and Space Equivalence as properties of transformations are defined. A Space Improvement does neither change the semantics nor it increases the needed space consumption, for a space equivalence the space consumption is required to remain the same. Several transformations are shown as Space Improvements and Equivalences. An abstract machine for space measurements is introduced. An implementation of this machine is used for more complex space- and runtime-analyses. Total Garbage Collection replaces subexpressions by a non-terminating constant with size zero, if the overall termination is not affected. Thereby the notion of improvement is more independent from the used garbage collector. Analogous to Space Improvements and Equivalences the notions Total Space Improvement and Total Space Equivalence are defined, which use Total Garbage Collection during the space measurement. Several Total Space Improvements and Equivalences are shown. Space measures for CHF* are defined, that are compatible to the space measure of LRP. An algorithm with sort-complexity is developed, that calculates the required space of independent processes that all start and end together. If a constant amount of synchronization restrictions is added and a constant number of processors is used, the runtime is polynomial, if arbitrary synchronizations are used, then the problem is NP-complete. Abstract machines for space- and time-analyses in CHF* are developed and implementations of these are used for space and runtime analyses

    Space improvements and equivalences in a polymorphically typed functional core language: context lemmas and proofs

    No full text
    We explore space improvements in LRP, a polymorphically typed call-by-need functional core language. A relaxed space measure is chosen for the maximal size usage during an evaluation. It Abstracts from the details of the implementation via abstract machines, but it takes garbage collection into account and thus can be seen as a realistic approximation of space usage. The results are: a context lemma for space improving translations and for space equivalences; all but one reduction rule of the calculus are shown to be space improvements, and the exceptional one, the copy-rule, is shown to increase space only moderately. Several further program transformations are shown to be space improvements or space equivalences, in particular the translation into machine expressions is a space equivalence. These results are a step Forward in making predictions about the change in runtime space behavior of optimizing transformations in callbyneed functional languages

    Space improvements and equivalences in a polymorphically typed functional core language: context lemmas and proofs

    No full text
    We explore space improvements in LRP, a polymorphically typed call-by-need functional core language. A relaxed space measure is chosen for the maximal size usage during an evaluation. It Abstracts from the details of the implementation via abstract machines, but it takes garbage collection into account and thus can be seen as a realistic approximation of space usage. The results are: a context lemma for space improving translations and for space equivalences; all but one reduction rule of the calculus are shown to be space improvements, and the exceptional one, the copy-rule, is shown to increase space only moderately. Several further program transformations are shown to be space improvements or space equivalences, in particular the translation into machine expressions is a space equivalence. These results are a step Forward in making predictions about the change in runtime space behavior of optimizing transformations in callbyneed functional languages

    Optimizing space of parallel processes

    No full text
    This paper is a contribution to exploring and analyzing space-improvements in concurrent programming languages, in particular in the functional process-calculus CHF. Space-improvements are defined as a generalization of the corresponding notion in deterministic pure functional languages. The main part of the paper is the O(n ·logn) algorithm SPOPTN for offline space optimization of several parallel independent processes. Applications of this algorithm are: (i) affirmation of space improving transformations for particular classes of program transformations; (ii) support of an interpreter-based method for refuting space-improvements; and (iii) as a stand-alone offline-optimizer for space (or similar resources) of parallel processes

    Space improvements for total garbage collection

    No full text
    The focus of this paper are space-improvements of programs, which are transformations that do not worsen the space requirement during evaluations. A realistic theoretical treatment must take garbage collection method into account. We investigate space improvements under the assumption of an optimal garbage collector. Such a garbage collector is not implementable, but there is an advantage: The investigations are independent of potential changes in an implementable garbage collector and our results show that the evaluation and other similar transformations are space-improvements
    corecore